<template>
  <div :style="nodeData.style" @mousedown="handleMouseDown" class="box">
    <div class="content">
      <svg
        :preserveAspectRatio="keepProportions ? 'xMidYMid meet' : 'none'"
        viewBox="0 0 104 104"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M 100 0 C 0 100 0 0 100 0 L 0 100 L 100 100 L 100 0 L 100 0 M 0 100"
          :stroke="nodeData.currentStyle.stroke"
          :stroke-width="nodeData.currentStyle.strokeWidth"
          :fill="nodeData.currentStyle.fill"
        />
      </svg>
    </div>
  </div>
</template>
<script>
import mixin from './mixin'
export default {
  name: 'TestCom4',
  mixins: [mixin],
  data() {
    return {
      keepProportions: true,
      nodeData: {
        shape: 'TestCom4', //节点名称，不能重复,必须要跟组件名称一致，不然找不到组件导入
        //节点数据
        createNodeDescribe: true,
        // 普遍样式
        currentStyle: {
          fill: 'none',
          stroke: '#000',
          strokeWidth: 2
        },
        isDropEnd: false,
        width: 100,
        height: 100,
        // 其他样式
        style: {}
      }
    }
  },
  mounted() {},
  methods: {}
}
</script>
<style scoped lang="less">
.box {
  width: 100%;
  height: 100%;
  cursor: move;
  svg {
    width: 100%;
    height: 100%;
  }
}
</style>
